package com.service.impl;

import com.dao.RbacMenuDao;
import com.entity.RbacMenu;
import com.entity.ResponseEntity;
import com.service.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RbacMenuServiceImpl implements RbacMenuService {
    @Autowired
    RbacMenuDao rbacMenuDao;
    @Override
    public ResponseEntity findAll() {
        List<RbacMenu> list = rbacMenuDao.findAll();
        return new ResponseEntity<>(200,"成功找到",list);
    }

    @Override
    public ResponseEntity findByRoleId(int roleId) {
        List<RbacMenu> list = rbacMenuDao.findByRoleId(roleId);
        return new ResponseEntity<>(200,"成功找到",list);
    }
}
